﻿@using MVCMongo.Services
@model IEnumerable<DataMongo.Entities.FriendList>

@{
    ViewBag.Title = "Search";
    Layout = "~/Views/Shared/_LayoutProfile.cshtml";
    var count = Model.Count();
}

<div class="container-fluid">
    <div class="row-fluid">
        <div class="span9">



            <div class="box">
                <div class="box-title">
                    <h3>

                        Friend List(@count)
                    </h3>

                </div>

                <div style="position: relative; overflow: hidden; width: auto" class="slimScrollDiv">
                    <div style="overflow: hidden; width: auto;" class="box-content nopadding " data-start="bottom" data-visible="true">
                        <ul class="messages">
                            @foreach (var item in Model)
                            {
                                <li class="left">

                                    <div class="image">
                                        @{
                                var imageUrl = UtilityService.GetCurrentUserImage(item.FriendId);
                                        }
                                        @if (!string.IsNullOrEmpty(imageUrl))
                                        {
                                            <img src="/content/UserProfile/User/@imageUrl" alt="" />
                                        }
                                        else
                                        {

                                            <img src="~/Content/UserProfile/img/NoImage.jpg" />
                                        }


                                    </div>
                                    <div class="message">
                                        <span class="caret"></span>
                                        <span class="name">@UtilityService.GetCurrentUserFullName(item.FriendId)</span>
                                        <p>Lorem ipsum aute ut ullamco et nisi ad. </p>

                                        <div class="box-title">

                                            <div class="actions">

                                                <button class="btn btn-mini" type="button">
                                                    <i class="icon-"></i>Details
                                                </button>



                                            </div>
                                        </div>
                                    </div>
                                </li>
                            }







                        </ul>

                    </div><div style="background: none repeat scroll 0% 0% rgb(102, 102, 102); width: 7px; position: absolute; top: 0px; opacity: 0.4; display: none; border-radius: 7px; z-index: 99; right: 1px; height: 895px;" class="slimScrollBar ui-draggable"></div><div style="width: 7px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 7px; background: none repeat scroll 0% 0% rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px;" class="slimScrollRail"></div>
                </div>
            </div>
        </div>

        <div class="span3">
            @Html.Action("FriendList")
        </div>

    </div>
</div>
